This forum is closed to new posts and
responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:
I believe you can accomplish this the same way as you would in any other web app...
We have been working on a similar project, and have been developing a custom solution within DWA.
In the Form design element - "s_CustomEditCode" - associated with our custom form, we created a function that adds a menu option to the forms action bar...
function kk(){
Nv("Do This", "javascript:doThis()", 'Perform an action', false, 20);
}
Now, the user can trigger the custom function by simply clicking the action button atop the form.
Within that custom function, we simply use javascript code to validate the form data and generate an XMLHTTPRequest (this is a very cut-down example)...
function doThis() {
var dbURL = new String( location.href.slice( 0, location.href.indexOf( '.nsf' ) + 4 ) );
var aURL = dbURL + "/(CustomAgent)?OpenAgent";
var thisDoc = document.forms[0];
var parameters = "&par1=@{@Name([Abbreviate];@UserName)}&par2=" + thisDoc.Field1.value + "&";
xmlhttp = getXMLHTTP();
xmlhttp.onreadystatechange = manageChange;
xmlhttp.open( "POST", aURL, true );
try {
xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlhttp.setRequestHeader("Content-length", parameters.length);
xmlhttp.setRequestHeader("Connection", "close");
xmlhttp.send(parameters);
} catch (e) {
alert( "Could not process at this time.");
}
}
We then collect the agent results and display them back to the user (typical AJAX stuff).
Obviously, you can simply call the agent and redirect the user to another page (or close the existing window).
Sure hope that helps you out!
Cheers,
T.
Feedback response number WEBB7P5V8R created by ~Wei Asatoopulakol on 02/10/2009